<%@page import="com.icss.util.Constants" pageEncoding="UTF-8"%>
<% session.setAttribute("app",request.getContextPath()+"/"); 
String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()
    +request.getContextPath()+"/";
 session.setAttribute("path",path);
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<script src="${app}/js/jquery/js/jquery-1.3.2.min.js"></script>
<script src="${app}/js/common.js"></script>
<script src="${app}/js/ajax.js"></script>
<script src="${app}/js/calendar02.js"></script>
<style type="text/css">
@import url("${app}/css/mobile_main.css");
@import url("${app}/css/screen.css");
@import url("${app}/js/jquery/css/smoothness/jquery-ui-1.7.1.custom.css");
.trmo{   
    background-color:#ACF7FF !important; 
    cursor: hand;  
} 
#row th a,#row td,#row th{
    overflow:hidden;
    white-space:nowrap;
    word-break:keep-all;
    dispaly:block;
    padding-left:8px;
    padding-right:8px;
}
</style>
<script type="text/javascript">
    //重新定义在JS中outerHTML属性，让其在大部分浏览器中兼容
	if(typeof(HTMLElement)!="undefined" && !window.opera){
          HTMLElement.prototype.__defineGetter__("outerHTML",function(){
            var a=this.attributes, str="<"+this.tagName, i=0;for(;i<a.length;i++)
            if(a[i].specified)
            str+=" "+a[i].name+'="'+a[i].value+'"';
            if(!this.canHaveChildren)
            return str+" />";
            return str+">"+this.innerHTML+"</"+this.tagName+">";
          });
         HTMLElement.prototype.__defineSetter__("outerHTML",function(s){
            var r = this.ownerDocument.createRange();
            r.setStartBefore(this);
            var df = r.createContextualFragment(s);
            this.parentNode.replaceChild(df, this);
            return s;
         });
         HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){
           return !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(this.tagName.toLowerCase());
         });
    } 

	function m_over(tr){   
	    tr.className=tr.className + " " + "trmo";   
	}   
	
	function m_out(tr){   
	    var cn = tr.className.replace(/\s+trmo/,'');   
	    tr.className = cn;   
	} 
	
	 $(window).resize(function(){
	   $('#query').height($(window).height()-$('#form1[target=query] table').height()-3);
      });	
    $(function(){
     setTimeout('changeSize()',100);
     $('#row td').mouseover(function(){
        $(this).attr('title',$(this).html().replace(/<\/.*>/,'').replace(/<.*>/,''))
     });
    });
    
    function checkExport(size,maxsize,msg){
       $('.exportlinks a').click(function(){
         if(size>maxsize){
           alert(msg); 
           return false;
         }
	   });
    }
    
    function changeSize(){
     $('#query').height($(window).height()-$('#form1[target=query] table').height()-3);
    }
    
    //DISPLAY TAG跳转到指定页
    function displaytagURL() 
    { 
        var tz=document.getElementById('tz').value;
        if(tz == ''){
		  alert('页码不能为空!');
		  $('#tz').focus();
		  $('#tz').select();
		  return false;
		}
		if(isNaN(tz)){
			alert("页码必须是数字!");
			$('#tz').focus();
			$('#tz').select();
			return false;
		}else if(tz.indexOf('.')!=-1){
		    alert("页码只能是正整数!");
			$('#tz').focus();
			$('#tz').select();
			return false;
		}
	
         var arrayOf_a_Tag = document.getElementsByTagName('a'); 
         
         var url="";
         var splitUrl =[];
         var realURL =''; 
         for (var k=0; k<arrayOf_a_Tag.length; k++){ 
            if(arrayOf_a_Tag[k].title.indexOf('转到')!=-1) { 
              url = arrayOf_a_Tag[k].href; 
              break;
            }
         }
         splitUrl = url.split("&");
         for(var i=0;i<splitUrl.length;i++) {
            if(splitUrl[i].indexOf('d-16544-p')!=-1&&i!=0){
              realURL+='&d-16544-p='+document.getElementById('tz').value;
            }else if(i==0){
              if(splitUrl[i].indexOf('d-16544-p')==-1){
                realURL+=splitUrl[i];
              }else{
                var aa=splitUrl[i].split("?");
                for(var j=0;j<aa.length;j++){
                  if(aa[j].indexOf('d-16544-p')!=-1){
                     realURL+='?d-16544-p='+document.getElementById('tz').value;
                  }else{
                     realURL+=aa[j];
                  }
                }
              }
            }else{
              realURL+='&'+splitUrl[i];
            }
         }
         window.location=realURL;
     } 

</script>